<script src="Libraries/js/js.js"></script>

<script language="javascript">

 function wopen(url, name, w, h){
	  w += 32;
	  h += 96;
	  wleft = (screen.width - w) / 2;
	  wtop = (screen.height - h) / 2;
	  
	  if (wleft < 0) {
		w = screen.width;
		wleft = 0;
	  }
	  if (wtop < 0) {
		h = screen.height;
		wtop = 0;
	  }
	  var win = window.open(url,
		name,
		'width=' + w + ', height=' + h + ', ' +
		'left=' + wleft + ', top=' + wtop + ', ' +
		'location=no, menubar=no, ' +
		'status=no, toolbar=no, scrollbars=yes, resizable=no');
	  // Just in case width and height are ignored
	  win.resizeTo(w, h);
	  // Just in case left and top are ignored
	  win.moveTo(wleft, wtop);
	  win.focus();
}
function printTL(malophp){
	//alert("Hello");
	wopen('Hienthinhatki.php?malophp='+malophp,'','780','580');
} 

function hienThiLopHPTheoBMHKNH(namhoc,hocki,mabm)
{ 
    //url="index.php?option=xemnhatki&makhoa="+makhoa;
    //alert(url);
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	 	alert ("Browser does not support HTTP Request")
	 	return
	}
	var url="xuliajax.php";
	url=url+"?func=hienthilophptheobmhknh&namhoc="+namhoc+"&hocki="+hocki+"&mabm="+mabm;
	url=url+"&sid="+Math.random()
    //alert(url);
	xmlHttp.onreadystatechange=stateChangedForhienThiLopHPTheoBMHKNH 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function stateChangedForhienThiLopHPTheoBMHKNH() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 	document.getElementById("dslophp").innerHTML=xmlHttp.responseText 
	 } 
} 
</script>
<?php
    include_once('Configs/database.php');
	include_once('Models/HocPhan.php');
	include_once('Configs/paging.php');
    include_once('Models/HocKiNamHoc.php');
    include_once('Models/HPMoVaoHKNH.php');
    include_once('Models/LopHocPhan.php');
    include_once('Models/Khoa.php');
	 include_once('Models/NhatKi.php');
    include_once('Models/NhatKiChiTiet.php');
    
?>
<link href="Libraries/css/jquery.datepick.css" rel="stylesheet" type="text/css"></head>
<form name="xemnhatkigiangday" method="POST">
<table align="center" class="font" width="800" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class=main_1><img border="0" src="Libraries/images/tbl_left.gif" width="10" height="25" /></td>
    <td align=center class=main_1>Xem Nhật Kí Giảng Dạy Lớp Học Phần </td>
    <td class=main_1><p align="right"><img border="0" src="Libraries/images/tbl_right.gif" width="10" height="25" /></p></td>
  </tr>
  <tr >
    <td class="border_1" colspan="3" valign="top"><table width="100%" border="0" align="center"  >
                <tr>
                    <td width="130%" >&nbsp;</td>
                </tr>
                <tr>
                  <td align="center"><table border="0">
                      <tr>
                        <td>Năm học</td>
                        <td>
							<select name="cbonamhoc" >
                          		<option value=" "></option>
                          			<?php
										$hknh = new HocKiNamHoc();
                                		$result = $hknh->dsNamHoc();
                                		while ($rows=mysql_fetch_array($result)){
                                    		echo "<option value='".$rows['namhoc']."'";				
				                    		echo ">".$rows['namhoc']."</option>";
                                		}
                                		
                                	?>
                        	</select>						</td>
                        <td>Học kì</td>
                        <td>
							<select name="cbohocki" >
                          		<option value="0"></option>
                          		<option value="1" >1</option>
                          		<option value="2" >2</option>
                          		<option value="3" >Hè</option>
                        	</select></td>
                        <td>Khoa</td>
                        <td><select name="cbokhoa" onchange="showBMTheoKhoa(this.value);">
                          <option value=" "></option>
                          <?php
							$khoa = new Khoa();
							
							$result = $khoa->dsTatCaKhoa();
							while ($rows = mysql_fetch_array($result)){
								echo "<option value='".$rows['makhoa']."'>".$rows['tenkhoa']."</option>";
							}
                            
						?>
                        </select></td>
                        <td>Bộ môn                        </td>
                        <td><table border="0">
                          <tr>
                            <td><div id="bomon">
                                <select name="cbobomon">
                                  <option value=""></option>
                                </select>
                            </div></td>
                          </tr>
                        </table></td>
                      </tr>
                    </table>                 </td>
               </tr>
              

               
        </table>
       
           

    </td>
  </tr>
</table>
<br />
<div id="dslophp">
</div>

</form>
